home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu096.dms / pu096.adf / PROFF.MAN.pp / PROFF.MAN
Text File  |  1991-07-08  |  62KB  |  2,222 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                        PROFF User's Guide
  10.  
  11.                            Version 1.0
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.                          ***  *******
  28.                          ***  *********
  29.                               **      **
  30.                               **      **
  31.                               *********
  32.                               *******
  33.                               **
  34.                               **
  35.                               **
  36.                          ******
  37.                          ****
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.                   Ozan S. Yigit & Steven Tress
  55.                            March 1984
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. 1.0                    Proff User's Guide                       1
  64.  
  65.  
  66. 11..00 IInnttrroodduuccttiioonn     
  67.  
  68.      This manual  describes  PROFF,  a  formatter  based  on  the
  69. FORMAT utility presented in _S_o_f_t_w_a_r_e _T_o_o_l_s_.  
  70.  
  71.      PROFF was  produced to provide a powerful formatter that can
  72. be  used  under  a  variety  of  microcomputers, thus providing a
  73. consistent  formatting  tool  across  environments.  PROFF can be
  74. used  to  format memos, reports, form letters  and documents such
  75. as  this  manual.  It  can  also  be  configured  to mimic  other
  76. formatting systems of similar nature.  
  77.  
  78.      This document  itself was produced with PROFF, using most of
  79. its  advanced  features.   PROFF  took  care  of  such  things as
  80. auto-paragraphing  and  the  production of  the Table of Contents
  81. as the manual was being formatted.  
  82.  
  83.      PROFF was  developed  under  a Digital Equipment Corporation
  84. Rainbow  100,  using  Mark  Williams  C  Compiler for portability
  85. reasons.  PROFF  is  available  under  VAX/VMS  operating system.
  86. PROFF  implementations  for   IBM  PC and APPLE ][ microcomputers
  87. are also underway.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. Rainbow,    VAX/VMS   are   trademarks   of   Digital   Equipment
  110. Corporation.  
  111. Mark  Williams  C  Compiler  is  a  trademark  of  Mark  Williams
  112. Company.  
  113. IBM  is a registered trademark of International Business Machines
  114. Inc.  
  115. APPLE is a trademark of Apple Computer Inc.  
  116. UNIX is a trademark of Bell Laboratories.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123. 1.0                    Proff User's Guide                       2
  124.  
  125.  
  126. 22..00 GGeenneerraall DDeessccrriippttiioonn    
  127.  
  128. 22..11 TThhee IInnppuutt    
  129.  
  130.      The text  that  is to be formatted by PROFF is typed into an
  131. input  file using any text editor. This file contains the text to
  132. be formatted as well as PROFF commands.  
  133.  
  134.      Each line  in  the  input file is either a command line or a
  135. text  line.  A  command  line is a line that begins with a period
  136. (".").  All other lines are text lines. The command lines are not
  137. printed  -  they  tell  PROFF  how you want it to format the text
  138. that  follows.  Appendix  A  summarizes all of the PROFF commands
  139. for a quick reference.  
  140.  
  141. 22..11..11 TTeexxtt     
  142.  
  143.      Text can  be  entered  into  the  input  file in any format.
  144. PROFF  removes  all  extra  blanks  and  tabs  between words when
  145. operating  in  fill  mode.  This  means  you do not have to worry
  146. about  how many words you put on a line, and you can break  lines
  147. wherever  it is convenient to your typing. Note however, that you
  148. cannot break a word between two lines.  
  149.  
  150.      Blanks and  tabs at the beginning of a line are not removed.
  151. This  is  useful  for  producing  special  tables  and performing
  152. special  types  of  indentation.   Thus, normal text lines should
  153. not have any leading tabs or blanks.  
  154.  
  155. 22..11..22 CCoommmmaannddss     
  156.  
  157.      A command  is  a line that starts with a period. Immediately
  158. following  the  period  is a command name. Some commands accept a
  159. numeric  quantity  or a character string parameter, which must be
  160. separated  from  the  command  name  by  a  space or a comma. For
  161. example, an indent command might appear as follows: 
  162.  
  163.      |
  164.      |It is to do nothing that the elect exists.
  165.      |.in 5
  166.      |- Oscar Wilde
  167.      |
  168.  
  169.      Assuming that  the  left margin was at column 1, PROFF would
  170. produce the following: 
  171.  
  172.      |
  173.      |It is to do nothing that the elect exists.
  174.      |     - Oscar Wilde
  175.      |
  176.  
  177.      (In the  examples above, as in those following, the vertical
  178.  
  179.  
  180.  
  181.  
  182.  
  183. 1.0                    Proff User's Guide                       3
  184.  
  185.  
  186. line  indicates  the  left  edge of input or the left edge of the
  187. printed page).  
  188.  
  189.      The number  following  the command may be preceeded by a "+"
  190. or  "-"  sign.   This plus or minus sign indicates an addition or
  191. subtraction  of  the  number to or from the current value for the
  192. command. for example, the text: 
  193.  
  194.      |
  195.      |Nothing to do but work,
  196.      |.in +3
  197.      |Nothing to eat but food,
  198.      |.in -3
  199.      |Nothing to wear but clothes
  200.      |.in +3
  201.      |To keep one from going nude.
  202.      |.in +7
  203.      |-Benjamin King
  204.      |
  205.  
  206. will produce as output:
  207.  
  208.      |
  209.      |Nothing to do but work,
  210.      |   Nothing to eat but food,
  211.      |Nothing to wear but clothes
  212.      |   To keep one from going nude.
  213.      |          -Benjamin King
  214.      |
  215.  
  216.      If a  number  is not supplied with a command that requires a
  217. number,  PROFF  will  use  a default value. The defaults for each
  218. command are summarized in Appendix A.  
  219.  
  220. 22..22 TThhee OOuuttppuutt    
  221.  
  222.      The main  functions  performed  by  PROFF  are   _f_i_l_l_i_n_g and
  223. _j_u_s_t_i_f_y_i_n_g_.   A  line  is filled by packing as many words onto it
  224. as  will  fit.  The  line  is  justified  by spacing words evenly
  225. between  the  left  and  right  margins.  When  PROFF  starts, it
  226. assumes  that  the text is to be filled and justified. Of course,
  227. when  fill and justify are not needed (as in the case of a letter
  228. or  a  table), there are commands to turn these features off, and
  229. back on again, as necessary.  
  230.  
  231.      When PROFF  is  in  fill  mode, it normally strips out extra
  232. spaces and tabs  between words.  
  233.  
  234.      Many PROFF  commands  cause  a _b_r_e_a_k to occur in the output.
  235. This  means  that the line currently being filled is  immediately
  236. output. Any following text goes into a new output line.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243. 1.0                    Proff User's Guide                       4
  244.  
  245.  
  246. 22..33 EExxeeccuuttiinngg PPRROOFFFF    
  247.  
  248.      Once a  text  file is ready for formatting, PROFF is started
  249. by  typing  the  program name, various options, name of the input
  250. file and the name of the output file. For example the command 
  251.  
  252.      A> proff  -po5 proffman.prf proff.man 
  253.  
  254. would  produce  this  document  as  proff.man, from an input file
  255. proffman.prf,   shifted  right  by 5 spaces.  (The symbol "A>" is
  256. CP/M system prompt).  
  257.  
  258. 22..44 BBiibblliiooggrraapphhiicc NNootteess    
  259.  
  260.      PROFF wa   produced   by   re-writing   the  Software  Tools
  261. Formatter   FORMAT.   Some  of  the  ideas  are  from  Freshwater
  262. Institute  RUNOFF,  NROFF,   University  of  Waterloo  SCRIPT and
  263. other  formatters  of similar nature. The underlying ideas of the
  264. mentioned  above  formatters  may  be  found in _S_o_f_t_w_a_r_e _T_o_o_l_s by
  265. B.W.  Kernighan and P.J. Plauger. 1976. (Addison-Wesley, Reading,
  266. Mass.).  
  267.  
  268. 22..55 RReeffeerreenncceess aanndd RReeaaddiinnggss   
  269.  
  270. Brian W. Kernighan and P. J. Plauger,
  271. _S_o_f_t_w_a_r_e _T_o_o_l_s
  272. Addison-Wesley (1976)
  273.  
  274. R. Furuta, J. Scofield and A. Shaw,
  275. _D_o_c_u_m_e_n_t _F_o_r_m_a_t_t_i_n_g _S_y_s_t_e_m_s_:
  276. _S_u_r_v_e_y_, _C_o_n_c_e_p_t_s_, _a_n_d _i_s_s_u_e_s
  277. ACM Computing Surveys, Sept. 1982, Pp. 417
  278.  
  279. Mark Stuart Brader,
  280. _A_n _I_n_c_r_e_m_e_n_t_a_l _T_e_x_t _F_o_r_m_a_t_t_e_r
  281. Department of Computer Science
  282. University of Waterloo, CS-81-12
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303. 1.0                    Proff User's Guide                       5
  304.  
  305.  
  306. 33..00 CCoommmmaanndd DDeessccrriippttiioonnss    
  307.  
  308.      This section  describes PROFF commands. Commands specify how
  309. the  program  is  to  process  the  text lines in the input file.
  310. Lines  in the input file that begin with a period (or the control
  311. character  selected  by  the  user)   immediately  followed  by a
  312. command  name  are  commands.  Any line that begins with a period
  313. and  followed  by  a  #  or ! is a comment line and is ignored by
  314. PROFF  - this allows you to put information in the file that will
  315. be neither processed nor output by PROFF.  
  316.  
  317.      As described  earlier,  some of the commands can be followed
  318. by  "parameters".   Parameters  are  used in executing a command;
  319. for  example, in the command ".sp 3", the parameter "3" tells the
  320. formatter  to  insert  3  blank  lines  into  the  document.  The
  321. following conventions are used in describing the parameters: 
  322.  
  323.    o Parameters  surrounded  by  square brackets are optional. If
  324.      not supplied, PROFF assumes a default value.  
  325.      (e.g. .sp [n]) 
  326.  
  327.    o Parameters  surrounded  by  angle  brackets  are  mandatory.
  328.      PROFF  will  display  a fatal error message if the parameter
  329.      is absent. (e.g. .set <variable name>) 
  330.  
  331.    o Parameters  surrounded  by squiggly brackets are to be typed
  332.      exactly as indicated. (e.g. .pn {roman}) 
  333.  
  334.    o A  bar  character  seperating the parameters within brackets
  335.      indicate  an  alternative. (e.g. .st [+|-][n] means both .st
  336.      [+n] and .st [-n]) 
  337.  
  338.      In describing  the  commands, the command is typed exacty as
  339. accepted  by  PROFF with the associated control character default
  340. (".").  If  more  than  one  form  of  the command is accepted by
  341. PROFF,  the  command names are separated with a bar indicating an
  342. alternative.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363. 1.0                    Proff User's Guide                       6
  364.  
  365.  
  366. 33..11 FFiilllliinngg aanndd JJuussttiiffyyiinngg   
  367.  
  368. .fi | .f | .fill 
  369.  
  370.      The  fill  command  causes  a line to be filled with as many
  371.      words  as  the  right  margin  allows. For this purpose, all
  372.      extra  blanks  and tabs are removed between words. Each word
  373.      is  separated  with  a  single  blank.  PROFF  automatically
  374.      assumes fill mode during the startup.  
  375.  
  376. .nf | .nofill 
  377.  
  378.      No  fill  discontinues the filling of the text. PROFF simply
  379.      copies  the  text to the output. This command may be used to
  380.      pass   tables   and   other   text   unaltered  through  the
  381.      formatter.  
  382.  
  383. .ju | .j | .justify 
  384.  
  385.      Justify  causes  the  words  on  a  line to be evenly spaced
  386.      between  the left and the right margins. Note that lines can
  387.      be  justified  only  if  lines  are also being filled. PROFF
  388.      automatically assumes justify mode during the startup.  
  389.  
  390. .nj | .nojustify 
  391.  
  392.      No justify discontinues the text justification.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423. 1.0                    Proff User's Guide                       7
  424.  
  425.  
  426. 33..22 TTeexxtt FFoorrmmaattttiinngg    
  427.  
  428. .br | .break 
  429.  
  430.      Break  causes  a  break: the current line is printed without
  431.      justification,  and the next word is placed at the beginning
  432.      of  a  new  line.  Note  that  many  PROFF commands cause an
  433.      implicit break.  
  434.  
  435. .in | .lm | .leftmargin [+|-][n] 
  436.  
  437.      Indent  causes  a  break and indents the following lines [n]
  438.      spaces  to the right of the left margin. [n] can be negative
  439.      to  allow  beginning  a line to the left of the left margin,
  440.      however,  a  line cannot begin to the left of column 0. If a
  441.      plus  or  minus  sign  is  used with n, then [n] is added or
  442.      subtracted to or from the current value.  
  443.  
  444. .ti | .i | .left [+|-][n] 
  445.  
  446.      Temporary  indent  is identical to the indent command except
  447.      that  it   applies  only  to  the next line of printed text.
  448.      Thus,  the  command ".ti +5" would cause the next line to be
  449.      printed 5 spaces to the right of those that follow.  
  450.  
  451. .st | .spaceto [-][n] 
  452.  
  453.      Spaceto  allows  spacing  to  line  [n]  from the top of the
  454.      current  page.  If a negative [n] is specified, than spacing
  455.      is  performed  to  line  [n]  from  the  bottom  of the page
  456.      (excluding  the footer lines). Thus, footnotes can be set at
  457.      a  fixed  distance  from the bottom of the page by a command
  458.      such as ".st -5".  
  459.  
  460. .sp | .s | .skip [n] 
  461.  
  462.      Space  causes a break and skips [n] lines, except at the top
  463.      of   a  page.  The space command is dependent on the setting
  464.      of line spacing.  
  465.  
  466. .ce | .center [n | on | off] 
  467.  
  468.      Center  causes  the  next  [n]  lines of text to be centered
  469.      between  the  left  and  right  margins.  Centering  may  be
  470.      started  with  "on" and terminated with "off", in which case
  471.      all input lines between these commands will be centered.  
  472.  
  473. .ul | .underline [n | on | off] 
  474.  
  475.      Underline  command  causes  the  text  on the next [n] input
  476.      lines  to  be  underlined  when  printed. If [n] is omitted,
  477.      only  the  next  line  is  underlined. This command does not
  478.  
  479.  
  480.  
  481.  
  482.  
  483. 1.0                    Proff User's Guide                       8
  484.  
  485.  
  486.      cause  a  break,  so  words in filled text may be underlined
  487.      by: 
  488.  
  489.  
  490.           |
  491.           |The "Pay-off" Theory: Only
  492.           |.ul
  493.           |losers
  494.           |believe in luck, horses, horoscopes
  495.           |and
  496.           |.ul
  497.           |lotteries.
  498.           |
  499.  
  500.      to get
  501.  
  502.           | 
  503.           |The "Pay-off" Theory: Only _l_o_s_e_r_s believe in 
  504.           |luck, horses, horoscopes and _l_o_t_t_e_r_i_e_s_.  
  505.           | 
  506.  
  507.           Underlining may  be  started  with  "on" and terminated
  508.      with "off", similar to the centering command.  
  509.  
  510. .ul | .underline [all | words] 
  511.  
  512.      This  version  of  the  underline command is used to set the
  513.      mode of underlining: 
  514.  
  515.           all   - underline across all characters,
  516.                   including spaces.
  517.           words - underline words only
  518.  
  519.  
  520. .bd | .bold [n | on | off] 
  521.  
  522.      The  bold  command  causes  the  text  on the next [n] input
  523.      lines  to be highlighted by overstriking. If [n] is omitted,
  524.      only  the  next line is highlighted.  Bolding may be started
  525.      with  "on"  and  terminated with "off" as in the case of the
  526.      center and underline commands.  
  527.  
  528. .db | .dbo | .disablebolding 
  529.  
  530.      Turns  the  bolding  off,  all bolding commands are ignored.
  531.      This feature is useful for rough drafts.  
  532.  
  533. .eb | .ebo | .enablebolding 
  534.  
  535.      Turns  the  bolding  feature  back  on. Bolding is turned on
  536.      during the PROFF startup.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543. 1.0                    Proff User's Guide                       9
  544.  
  545.  
  546. 33..33 PPaaggee FFoorrmmaattttiinngg    
  547.  
  548. .ls | .spc | .spacing [n] 
  549.  
  550.      Line  spacing is the command to set line spacing. Set n to 1
  551.      for single spacing, 2 for double spacing etc.  
  552.  
  553. .bp | .pg | .page [n] 
  554.  
  555.      The  begin  page  command  causes  a break, ends the current
  556.      page,  outputs footers if required and begins a new page. If
  557.      [n]  is  present, the page number is set to [n]. The default
  558.      action is to number the pages incrementally.  
  559.  
  560. .pn | .pagenumber {roman} | {arabic} 
  561.  
  562.      Page  number  command defines the format of the page number.
  563.      Uppercase  roman  numerals  may  be  obtained  with  "roman"
  564.      keyword.  To  convert  the  page  numbers  back  to  normal,
  565.      "arabic"  is  specified.  PROFF  uses  arabic  numerals as a
  566.      default.  
  567.  
  568. .np | .nopaging 
  569.  
  570.      No  paging  disables  the  pagination.  When  PROFF is in no
  571.      paging  mode,  "begin  page"  (.bp)  and "page length" (.pl)
  572.      commands  are  ignored. This mode of operation is especially
  573.      useful  for  using  the  proff  output with the multi-column
  574.      formatter (MC).  
  575.  
  576. .pa | .paging 
  577.  
  578.      Paging  enables  normal page generation. This command starts
  579.      a   new  page  and  restores  the  page  length to the value
  580.      previous to the ".np" command.  
  581.  
  582. .ne | .need | .tp | .testpage [n] 
  583.  
  584.      Test  page  checks  to see whether at least [n] lines remain
  585.      in  the  current  page.  If  less  than this number of lines
  586.      remain,  printing  will  resume at the top of a new page. If
  587.      [n] is missing, it is assumed to be zero.  
  588.  
  589. .he | .header <text> 
  590.  
  591.      Header  sets  the  text  to  be printed on top of each page.
  592.      <text>  is   divided  into  sections  which  are  to be left
  593.      justified,  centered  and  right justified. To divide <text>
  594.      into  these  three  parts, the first character is assumed to
  595.      be   a   separator.   (e.g.   /left/center/right/)  But  any
  596.      non-alphanumeric  character may also be used. The characters
  597.      "#"  and  "%"  are replaced with the current page number and
  598.  
  599.  
  600.  
  601.  
  602.  
  603. 1.0                    Proff User's Guide                      10
  604.  
  605.  
  606.      day/time in the header.  
  607.  
  608. .fo | .footer <text> 
  609.  
  610.      Footer  is  identical to header except that it sets the text
  611.      to be printed at the bottom of each page.  
  612.  
  613. .oh <text> 
  614.  
  615.      The odd header command sets the header for odd pages only.  
  616.  
  617. .eh <text> 
  618.  
  619.      The  even  header  command  sets  the  header for even pages
  620.      only.  
  621.  
  622. .of <text> 
  623.  
  624.      The odd footer command sets the footer for odd pages only.  
  625.  
  626. .ef <text> 
  627.  
  628.      The  even  footer  command  sets  the  footer for even pages
  629.      only.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663. 1.0                    Proff User's Guide                      11
  664.  
  665.  
  666. 33..44 PPaaggee LLaayyoouutt    
  667.  
  668.      These commands  are  used  to  specify where on the page you
  669. want  the  formatted  text  to be placed. The general layout of a
  670. page is as follows: 
  671.  
  672.         page offset (.po)                               |
  673.         |                                               |
  674.         V                                               |
  675.         +----+-------------------------------------+----+ -+
  676.         |    |  top margin (m1) includes header    |    |  |
  677.         +----+-------------------------------------+----+  |
  678.         |    |          top margin 2 (m2)          |    |  |
  679.         +----+-------------------------------------+----+  |
  680.         |    |                  .                  |    |  P
  681.         |    |<-- indent (.in)  .                  |    |  A
  682.         |    |                  .                  |    |  G
  683.         |    |                  T                  |    |  E
  684.         |    |                  E                  |    |
  685.         |    |                  X                  |    |  L
  686.         |    |                  T                  |    |  E
  687.         |    |                  .                  |    |  N
  688.         |    |               right margin (.rm) -->|    |  G
  689.         |    |                  .                  |    |  T
  690.         |    |                  .                  |    |  H
  691.         |    |                  .                  |    |  |
  692.         +----+-------------------------------------+----+  |
  693.         |    |          bottom margin 3 (m3)       |    |  |
  694.         +----+-------------------------------------+----+  |
  695.         |    |  bottom margin (m4) includes footer |    |  |
  696.         +----+-------------------------------------+----+ -+
  697.         |                                               |
  698.         |                                               |
  699.  
  700. .po | .offset [+|-][n] 
  701.  
  702.      The  page  offset command moves the entire page to the right
  703.      or  left  depending  on the specified value. All indentation
  704.      is  according  to  the  page  offset.  PROFF  assumes a page
  705.      offset  of  0 during the startup. If [n] is specified with a
  706.      plus  or  minus,  it  will  be  added or subtracted from the
  707.      current value.  
  708.  
  709. .rm | .rightmargin [+|-][n] 
  710.  
  711.      Right  Margin  sets  the  position  of  the  last  printable
  712.      character  from  the  left  edge of the page to [n]. Default
  713.      value  for  right  margin is 65.  A plus or minus value will
  714.      be  added  or  subtracted from the current value.  If [n] is
  715.      not specified, right margin is set to the default value.  
  716.  
  717. .pl | .ps | .pagesize [n] 
  718.  
  719.  
  720.  
  721.  
  722.  
  723. 1.0                    Proff User's Guide                      12
  724.  
  725.  
  726.      Page  length  is used to set the number of lines that are to
  727.      be  printed on a page including the header and footer lines.
  728.      After  [n]  lines are printed, the paper will advance to the
  729.      top  of  next  page. The default page length is 66 lines (11
  730.      inches  for  6  lines/inch).  This  command  is  disabled if
  731.      nopaging is set.  
  732.  
  733. .m1 [n] 
  734.  
  735.      Margin  1  sets  the  number of lines (including the header)
  736.      which  will  be  left  at  the  top  of the page to [n]. The
  737.      default  setting  is  3.  If  [n]  is omitted, is set to the
  738.      default.  
  739.  
  740. .m2 [n] 
  741.  
  742.      Margin  2  sets the number of blank lines between the header
  743.      and the first line of text. The default setting is 2.  
  744.  
  745. .m3 [n] 
  746.  
  747.      Margin  3  sets the number of blank lines between the footer
  748.      and the last line of text. The default setting is 2.  
  749.  
  750. .m4 [n] 
  751.  
  752.      Margin  4  sets  the  number of lines (including the footer)
  753.      which  will  be  left  at the bottom of the page to [n]. The
  754.      default setting is 3.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783. 1.0                    Proff User's Guide                      13
  784.  
  785.  
  786. 33..55 TTaabbllee ooff CCoonntteennttss   
  787.  
  788.      This section  describes  the  the  commands that are used to
  789. generate  a table of contents. Basically, a contents line command
  790. is  used  in every place in the document where an entry is needed
  791. in  the  table  of  contents.  PROFF stores the text and the page
  792. number  when  it  encounters this command.  After the the body of
  793. the  document  is  processed,  a print contents command dumps the
  794. contents  table.  The  contents  should  be dumped in a new page,
  795. with  nofill.  Page  numbering should be disabled if the table of
  796. contents is to be used in front of the document.  
  797.  
  798.  
  799. .cl | .contline [<n> <text>] 
  800.  
  801.      Contents  line specifies a line of <text> to be entered into
  802.      the  table of contents. <n> specifies the level at which the
  803.      item  is  to  be  printed  in  the  table. When the table is
  804.      printed,  each  level  of entry will be indented by specific
  805.      number  of  spaces.  <text> appears in the output exactly as
  806.      it  appears  in  the  contents  line  command,  except  that
  807.      leading  blanks are removed.  If no options specified in the
  808.      contents   line,  a  blank  is  inserted  during  the  table
  809.      output.  
  810.  
  811. .pc | .printcont [n] 
  812.  
  813.      Print  Contents  causes  the  currently accumulated table of
  814.      contents  to  be printed. If [n] is specified, it is used as
  815.      the  indent  value for each level.  If [n] is not specified,
  816.      it is defaulted to 3.  
  817.  
  818.           A contents   line   at   level   0   is   as   wide  as
  819.      rightmargin-indent.  The  outlook  of  the table of contents
  820.      may  be  changed  by  altering  the  right margin and indent
  821.      values.  A  typical  table  of  contents  may be produced as
  822.      follows: 
  823.  
  824.           |.page
  825.           |.he ////
  826.           |.fo ////
  827.           |.nofill
  828.           |.sp
  829.           |.center
  830.           |Table of Contents
  831.           |.sp
  832.           |.printcont
  833.  
  834.      The  following example illustrates the generation of a table
  835.      of  contents. Note that only one table of contents is active
  836.      for a PROFF session.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843. 1.0                    Proff User's Guide                      14
  844.  
  845.  
  846.  
  847.           .cl
  848.           .cl 0 A. Introduction
  849.           Introduction
  850.                   text
  851.                   .
  852.           .cl
  853.           .cl 0 B. Methods
  854.           Methods
  855.                   text
  856.                   .
  857.           .cl 1 a) Sampling Procedures
  858.           Sampling
  859.                   text
  860.                   .
  861.           .cl 1 b) Laboratory Procedures
  862.           Laboratory
  863.                   text
  864.                   .
  865.           .cl
  866.           .cl 0 C. Results
  867.           Results
  868.                   text
  869.                   .
  870.                   .
  871.           .pg
  872.           .nf
  873.           .he ////
  874.           .fo ////
  875.           .ce
  876.           Table of Contents
  877.           .sp
  878.           .pc
  879.  
  880.      These commands will produce the following table:
  881.  
  882.                           Table of Contents
  883.  
  884.           A. Introduction...............................   1
  885.  
  886.           B. Methods....................................   3
  887.              a) Sampling Procedures.....................   3
  888.              b) Laboratory Procedures...................   4
  889.  
  890.           C. Results....................................   5
  891.  
  892.      Macros   may  be  defined  as  described  in  the  following
  893.      sections to help the generation of the table of contents.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903. 1.0                    Proff User's Guide                      15
  904.  
  905.  
  906. 33..66 MMiisscceellllaanneeoouuss     
  907.  
  908.      This section    describes    miscellaneous   commands   that
  909. radically  increase  the  formatting  powers  of  PROFF. With the
  910. assistance  of  variables,  PROFF  can  generate form letters and
  911. documents  with  dynamic  parts.  The ability to save and restore
  912. formatter  context  eliminates  the  need  to  remember the exact
  913. settings of the formatter across the document.  
  914.  
  915. .vs | .set <variable> [definition] 
  916.  
  917.      Set  variable   defines  a  variable to be later used in the
  918.      document.   If  the  definition part is left out, PROFF uses
  919.      the  variable name as a prompt and allows the user to define
  920.      the  variable  interactively.  Variable  names  cannot start
  921.      with   a   numeric   character,   and   may   only   contain
  922.      alphanumeric   characters.  The definition of a variable may
  923.      not  contain  any  blanks,  unless  they  are  surrounded by
  924.      double-quotes.  To  get  a  double  quote  within a a quoted
  925.      definition, two double-quotes are used.  
  926.  
  927.           Once the  variable  is defined, it can be used anywhere
  928.      in  the  document,  including  the  command  line  itself. A
  929.      variable  substitution  is  invoked by a dollar sign ($). (A
  930.      literal  $ is inserted into text using _$).  A variable name
  931.      must  be  delimited  by  a non-alphanumeric character within
  932.      the   text.  If  the  contents  of  the  variable  is  to be
  933.      appended  to  other   alphanumeric  characters,  it  must be
  934.      surrounded  by  wiggly  braces  ("{" and "}"). The following
  935.      is an example of variable usage: 
  936.  
  937.      |.nf
  938.      |.vs v1 Murphy
  939.      |${v1}'s first law:
  940.      |       Nothing is as easy as it looks.
  941.      |${v1}'s second law:
  942.      |       Everything takes longer than you think.
  943.      |Charley's observation:
  944.      |       Computers were invented by $v1.
  945.      |
  946.  
  947.      Produces the following:
  948.  
  949.      |
  950.      |Murphy's first law:
  951.      |       Nothing is as easy as it looks.
  952.      |Murphy's second law:
  953.      |       Everything takes longer than you think.
  954.      |Charley's observation:
  955.      |       Computers were invented by Murphy.
  956.      |
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963. 1.0                    Proff User's Guide                      16
  964.  
  965.  
  966. .vg | .get <variable> <prompt> 
  967.  
  968.      Get   variable   is  the  interactive  version  of  variable
  969.      definition.  In  this   variant,  a prompt string is used to
  970.      obtain  the  value  of  the  variable, which is typed at the
  971.      user's  terminal.  If  the  prompt  string  is  to   contain
  972.      blanks,  tabs etc., it must be enclosed in double quotes. No
  973.      quotes are necessary for input text.  
  974.  
  975. .nr <a-z> [+|-][n] 
  976.  
  977.      Number  register  is  used  to define registers that contain
  978.      numeric  values.   There are 26 number registers, named a-z.
  979.      The  command ".nr x n" sets the number register "x" to value
  980.      n;  ".nr  x  +n" increments the number register by n; ".nr x
  981.      -n"  decrements  the  number register by n. The value of the
  982.      number  register  x  is placed in the text by the appearance
  983.      of  @nx.  A  literal  @  may  be  inserted using _@.  Number
  984.      registers  may  be used on command lines and anywhere in the
  985.      text.  
  986.  
  987. .cc | .cchar [char] 
  988.  
  989.      Control  Character   sets  the  character that distinguishes
  990.      PROFF   commands  from  text  to be formatted. As a default,
  991.      control  character  is set to  (".") period.  This character
  992.      may  be  changed to something other than a period, either to
  993.      mimic  other  formatters  or  to  disallow interpretation of
  994.      lines  beginning  with  a period. (This document makes heavy
  995.      use of the .cc command).  
  996.  
  997. .ec | .echar [char] 
  998.  
  999.      Escape  Character   sets  the  character  that disallows the
  1000.      interpretation  of spacial characters such as @ and $. PROFF
  1001.      uses an underline ("_") character as a default.  
  1002.  
  1003. .so | .source | .include | .require [filename] 
  1004.  
  1005.      The  source  (include)  command  allows external files to be
  1006.      inserted  into  the  input file during the formatting. Using
  1007.      this  feature, tables, graphs and other  documents generated
  1008.      outside  PROFF  may  be  included  into  the  document being
  1009.      formatted.  This  feature is also very useful in including a
  1010.      common  set  of  macros during formatting. Include files may
  1011.      be  nested inside other include files. Currently, PROFF only
  1012.      allows  a  nested  include files level of 8. Filename may be
  1013.      enclosed in quotes.  
  1014.  
  1015. .sv | .save 
  1016.  
  1017.      The  save command allows the saving of the current formatter
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023. 1.0                    Proff User's Guide                      17
  1024.  
  1025.  
  1026.      context  on  a   pushdown  stack.  The  saved context of the
  1027.      formatter  segment (FSECT) includes the following values and
  1028.      flags: 
  1029.  
  1030.      values                  flags           on   |  off
  1031.      ------                  -----           
  1032.      indent          (.in)   fill            (.fi | .nf)
  1033.      right margin    (.rm)   justify         (.ju | .nj)
  1034.      offset          (.po)   paging          (.pa | .np)
  1035.      line spacing    (.ls)   number type     (.pn)
  1036.      page length     (.pl)   bolding         (.eb | .db)
  1037.      margin values   (.m1)   autoparagraph   (.ap | .na)
  1038.                      (.m2)
  1039.                      (.m3)
  1040.                      (.m4)
  1041.      control char    (.cc)
  1042.      escape char     (.ec)
  1043.  
  1044.  
  1045. .rs | .restore 
  1046.  
  1047.      The  restore command pops the context stack and restores the
  1048.      values and flags as defined above.  
  1049.  
  1050. .lx | .lex <command> [equate] 
  1051.  
  1052.      The  lexical modification command is essentially a permanent
  1053.      replacement  of  a  given  command. This command is used for
  1054.      changing  the  command  names without resorting to the macro
  1055.      facility.  Lex permanently removes the old command name from
  1056.      command  tables and replaces it with the new definition.  If
  1057.      the  equate is not specified, the command  becomes undefined
  1058.      and  is  no  longer  recognised by PROFF. The command equate
  1059.      should not contain  non-alphanumeric characters.  
  1060.  
  1061. .ap | .autoparagraph 
  1062.  
  1063.      The   autoparagraph   command   turns   on   the   automatic
  1064.      paragraphing  feature.  If  auto-paragraphing  is  on, every
  1065.      line  that starts with a  _b_l_a_n_k or a  _t_a_b character starts a
  1066.      new  paragraph.  A  new  line  is  generated  (.sp)  and the
  1067.      beginning  of  the  paragraph  is  indented  by five spaces.
  1068.      Autoparagraphing   is   the   equivalent  of  the  following
  1069.      commands: 
  1070.           |
  1071.           |textextextextext
  1072.           |.sp
  1073.           |.ti +5
  1074.           |textextextextext
  1075.           |
  1076.  
  1077. .na | nap | .noautoparagraph 
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083. 1.0                    Proff User's Guide                      18
  1084.  
  1085.  
  1086.      No Autoparagraph command disables auto-paragraphing.  
  1087.  
  1088. .wr | .write <string> 
  1089.  
  1090.      Write  is  a  special  output  command,  only  to be used to
  1091.      configure  printers  and  other  output  devices with escape
  1092.      sequences.  This command outputs the associated string as it
  1093.      is  encountered,  without  going  through  the normal output
  1094.      routines  of the formatter. Currently, the output string may
  1095.      contain  control  characters specified as "^<char>", decimal
  1096.      numbers  within  the  range  of 1-255, and other characters.
  1097.      Blanks  within  the  string  are skipped. Any portion of the
  1098.      string  enclosed  with  double  quotes  is  output as is. To
  1099.      output  a  double  quote,  two  double  quotes  must be used
  1100.      within  the quoted string.  Following is a typical string to
  1101.      set a Digital La-100 printer to letter quality print mode: 
  1102.  
  1103.           |
  1104.           |.wr ^["[2z"
  1105.           |
  1106.  
  1107.      In  the  control string, "^[" is the ASCII equivalent of the
  1108.      Escape  (esc) character.  Following mapping table is used to
  1109.      convert  characters  starting  with  a caret to their binary
  1110.      equivalents: ("|" indicates an alternative) 
  1111.  
  1112.           Control chr     Dec.    Oct.    Hex.
  1113.           -----------     ----    ----    ----
  1114.           ^a | ^A (soh)   1       01      01
  1115.           ^b | ^B (stx)   2       02      02
  1116.           ^c | ^C (etx)   3       03      03
  1117.           ^d | ^D (eot)   4       04      04
  1118.           ^e | ^E (enq)   5       05      05
  1119.           ^f | ^F (ack)   6       06      06
  1120.           ^g | ^G (bel)   7       07      07
  1121.           ^h | ^H (bs)    8       10      08
  1122.           ^i | ^I (ht)    9       11      09
  1123.           ^j | ^J (nl)    10      12      0A
  1124.           ^k | ^K (vt)    11      13      0B
  1125.           ^l | ^L (np)    12      14      0C
  1126.           ^m | ^M (cr)    13      15      0D
  1127.           ^n | ^N (so)    14      16      0E
  1128.           ^o | ^O (si)    15      17      0F
  1129.           ^p | ^P (dle)   16      20      10
  1130.           ^q | ^Q (dc1)   17      21      11
  1131.           ^r | ^R (dc2)   18      22      12
  1132.           ^s | ^S (dc3)   19      23      13
  1133.           ^t | ^T (dc4)   20      24      14
  1134.           ^u | ^U (nak)   21      25      15
  1135.           ^v | ^V (syn)   22      26      16
  1136.           ^w | ^W (etb)   23      27      17
  1137.           ^x | ^X (can)   24      30      18
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143. 1.0                    Proff User's Guide                      19
  1144.  
  1145.  
  1146.           ^y | ^Y (em)    25      31      19
  1147.           ^z | ^Z (sub)   26      32      1A
  1148.           ^[      (esc)   27      33      1B
  1149.           ^\      (fs)    28      34      1C
  1150.           ^]      (gs)    29      35      1D
  1151.           ^^      (rs)    30      36      1E
  1152.           ^_      (us)    31      37      1F
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203. 1.0                    Proff User's Guide                      20
  1204.  
  1205.  
  1206. 33..77 DDeeffiinniinngg NNeeww CCoommmmaannddss ((MMaaccrrooss))  
  1207.  
  1208.      In document  formatting,  it is common to repeat a series of
  1209. commands  at  several places in the document. PROFF allows you to
  1210. define  a  new command that will replace these repeated commands.
  1211. This  not  only  saves  typing  but ensures that _e_x_a_c_t_l_y the same
  1212. sequence  of  commands are applied throughout the document. A new
  1213. command  that you define is formally called a _m_a_c_r_o_.  To define a
  1214. macro,  you  must  use  the  define macro (.de | .define) and end
  1215. macro (.en) commands.  
  1216.  
  1217. .de | .define <macro name> 
  1218.  
  1219.      Define  is  used  to define a <macro name> to which a series
  1220.      of   commands  to  be  assigned.  This  definition  line  is
  1221.      followed  by  any number of PROFF commands and/or text which
  1222.      define  the action that the macro will subsequently produce.
  1223.      Macros may refer to other macros.  
  1224.  
  1225. .en 
  1226.  
  1227.      End  macro  is  the last line in the command definition. You
  1228.      must  put  in  this  command  to  finish a currently defined
  1229.      macro. ".en" command should not be re-defined as a macro.  
  1230.  
  1231. The  example below defines macros ".note" and ".endnote", similar
  1232. to the RUNOFF commands of the same name.  
  1233.  
  1234.      |
  1235.      |.define note
  1236.      |.sp
  1237.      |.ce
  1238.      |NOTE
  1239.      |.sp
  1240.      |.fi
  1241.      |.in +5
  1242.      |.rm -5
  1243.      |.en
  1244.      |
  1245.      |.define endnote
  1246.      |.sp
  1247.      |.nf
  1248.      |.in -5
  1249.      |.rm +5
  1250.      |.en
  1251.      |
  1252.  
  1253.      A macro  is  used  like  any  other  PROFF  command, control
  1254. character  followed  immediately   by  the name of the macro. For
  1255. example, the above macros may be used as follows: 
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263. 1.0                    Proff User's Guide                      21
  1264.  
  1265.  
  1266.  
  1267.      |
  1268.      |.note
  1269.      |textextextextextextextextextext
  1270.      |              .
  1271.      |              .
  1272.      |              .
  1273.      |.endnote
  1274.      |
  1275.  
  1276. The  following  note  is  generated  by the same macros described
  1277. previously.  
  1278.  
  1279.                               NOTE
  1280.  
  1281.      Flap's  Law:  Any  inanimate  object, regardless of its
  1282.      position  or  configuration, may be expected to perform
  1283.      at  any time in a totally unexpected manner for reasons
  1284.      that  are  either  entirely  obscure or else completely
  1285.      mysterious.  
  1286.  
  1287. Special  symbols  may  be  used  within a macro definition. These
  1288. symbols  represent the parameters passed to a macro, delimited by
  1289. blanks  or  commas.   These symbols are $0 for macro name, $1 for
  1290. the  first  parameter,  $2 for the second parameter and so on, up
  1291. to  $9  for  the ninth parameter. Currently, macro parameters may
  1292. only  contain  alphanumerics,  no string parameters are possible.
  1293. The previous macro "note" may now be defined as follows: 
  1294.  
  1295.      |
  1296.      |.define note
  1297.      |.sp
  1298.      |.ce
  1299.      |$2 $3 $4 $5 $6 $7 $8 $9
  1300.      |.nr m $1
  1301.      |.sp
  1302.      |.fi
  1303.      |.in +$1
  1304.      |.rm -$1
  1305.      |.en
  1306.      |
  1307.      |.define endnote
  1308.      |.sp
  1309.      |.nf
  1310.      |.in -@nm
  1311.      |.rm +@nm
  1312.      |.en
  1313.      |
  1314.  
  1315.      In this  version  of  the  "note"  and "endnote" macros, the
  1316. first  parameter  ($1)  is used to pass the value for indentation
  1317. and   right  margin  adjustment.   All  the  rest  of  the  macro
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323. 1.0                    Proff User's Guide                      22
  1324.  
  1325.  
  1326. parameters  ($2  -  $9)  are  used  as the title of the note. The
  1327. indent  value  passed as the first parameter is also saved in the
  1328. number  register  "m"  to  communicate it to the "endnote" macro,
  1329. such  that  when  the  endnote  macro  is called, both indent and
  1330. right  margin  values are adjusted back to normal. It is possible
  1331. and  may be more useful to use ".save" and ".restore" commands to
  1332. accomplish  the  same  task,  especially  if the macro alters the
  1333. current   formatting   context   drastically.   The  ".note"  and
  1334. ".endnote" macros may be called as follows: 
  1335.  
  1336.      |
  1337.      |.note 5 Asimov's Law of Robotics
  1338.      |textextextextextextextextextext
  1339.      |              .
  1340.      |              .
  1341.      |              .
  1342.      |.endnote
  1343.      |
  1344.  
  1345.      In this  usage,  the  indent  value  will be adjusted by +5,
  1346. right  margin will be adjusted by -5, and the title "Asimov's Law
  1347. of Robotics" will appear centered above the note.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383. 1.0                    Proff User's Guide                      23
  1384.  
  1385.  
  1386. 44..00 EExxeeccuuttiinngg PPRROOFFFF    
  1387.  
  1388.      The PROFF  program  may be invoked with a series of optional
  1389. parameters  and  filenames  on  the  command  line.  The  command
  1390. synopsis is: 
  1391.  
  1392. PROFF [+n] [-n] [-v] [-s] [-pon] [-ifile] input [output] 
  1393.  
  1394. The    square    brackets   indicate   an   optional   parameter.
  1395. Interpretation of the parameters is as follows: 
  1396.  
  1397.      ++nn 
  1398.           Start  the  printing  of the document at the first page
  1399.           with number n.  
  1400.  
  1401.      --nn 
  1402.           Stop  printing  at  the first page numbered higher than
  1403.           n.  
  1404.  
  1405.      --vv 
  1406.           Verbose  mode.  PROFF  indicates the source files being
  1407.           included  into  document, and produces a summary of the
  1408.           number  of  textlines  read in, the number of lines and
  1409.           actual  pages  generated.  A  memory  usage  summary of
  1410.           internal  storage for macros, stacks and tables is also
  1411.           displayed.  
  1412.  
  1413.      --ss 
  1414.           Stop  before  each  page,  including  the  first one to
  1415.           allow  paper  adjustment. A prompt is given just before
  1416.           the  first page. For each page thereafter, the terminal
  1417.           bell  is  rung  to indicate that another sheet of paper
  1418.           is needed.  
  1419.  
  1420.      --ppoonn 
  1421.           Sets  the page offset to n. This is equivalent to ".po"
  1422.           command  within  the  document.  It is recommended that
  1423.           -pon  option  be  used  instead of embedding the offset
  1424.           value within the document.  
  1425.  
  1426.      --iiffiillee 
  1427.           Includes  the  given  file  to  the formatted document.
  1428.           This  is equivalent to a ".include file" command within
  1429.           the  document.  This  option  may be repeated more than
  1430.           once, -ifile1 -ifile2 etc.  
  1431.  
  1432.      iinnppuutt 
  1433.           Specifies  the  input  file to be formatted. PROFF does
  1434.           not   impose   any   file  extension.  The  recommended
  1435.           extension is ".PRF".  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443. 1.0                    Proff User's Guide                      24
  1444.  
  1445.  
  1446.  
  1447.      oouuttppuutt 
  1448.           Specifies  the  output file for the formatted document.
  1449.           If  this  is  omitted, output is directed to the user's
  1450.           terminal.  
  1451.  
  1452. Following are some examples of PROFF command lines: 
  1453.  
  1454.      A>PROFF -v proffman.prf 
  1455.  
  1456. Format  this  document (proffman.prf) in verbose mode, and output
  1457. the formatted document to the terminal.  
  1458.  
  1459.      A>PROFF +5 -imacros.pma proffman.prf 
  1460.  
  1461. Format  this document, include the external file MACROS.PMA, skip
  1462. the  first  four  pages  and output the formatted document to the
  1463. terminal.  
  1464.  
  1465.      A>PROFF -po10 proffman.prf proff.man 
  1466.  
  1467. Format  this  document, shift the entire document by 10 spaces to
  1468. right and output to a file called proff.man.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503. 1.0                    Proff User's Guide                      25
  1504.  
  1505.  
  1506. 55..00 TTiippss oonn uussiinngg PPRROOFFFF  
  1507.  
  1508. 55..11 CCaarree aanndd FFeeeeddiinngg ooff MMeemmoorryy 
  1509.  
  1510.      PROFF uses  a  dynamic  memory allocation scheme for some of
  1511. its  operations.   These  are  macro definitions, contents lines,
  1512. variables  and  save  context   operation.   Running  PROFF under
  1513. microcomputers  with  limited  memory  resources  (64k  or  less)
  1514. require some care in using these commands: 
  1515.  
  1516. a) Do   not  declare  macros  that  are  not  needed  within  the
  1517.    document.  
  1518.  
  1519. b) Do  not use comments within macros. Due to delayed evaluation,
  1520.    comments   will  also  be  stored  as  a  part  of  the  macro
  1521.    definition.  
  1522.  
  1523. c) Where  possible,  avoid  using too much text within macros. It
  1524.    is  just  as  easy  to  pass  the information during the macro
  1525.    call.  
  1526.  
  1527. d) Use only the shortest form of commands within macros.  
  1528.  
  1529. e) Be brief in contents line text.  
  1530.  
  1531. f) Use  short  variable  names as long as it is not so cryptic as
  1532.    to be confusing.  
  1533.  
  1534. g) Avoid unnecessary blanks within the variable definitions.  
  1535.  
  1536. h) Avoid  too many context saves without a corresponding restore.
  1537.    The restore operation reclaims the memory used for a save.  
  1538.  
  1539.  
  1540.      Even if  the formatter is used with a system of large memory
  1541. resources,  some  of the precautions above are applicable. (Utz's
  1542. 4th   law   of  Computer  Programming:  Any  given  program  will
  1543. eventually  expand  to  fill all the available memory.) Using the
  1544. -v  option  under  memory-restricted  systems  may  be  useful in
  1545. determining the memory usage.  
  1546.  
  1547.  
  1548. 55..22 FFoorrmmaattttiinngg wwiitthhoouutt ffuussss   
  1549.  
  1550.      PROFF, using  its  default  settings, may provide reasonably
  1551. formatted  output in many situations.  As an example, examine the
  1552. document  PROFF.TUT.  This  document  does not use ANY formatting
  1553. commands. All formatting is done with the default settings.  
  1554.  
  1555.  
  1556. 55..33 VVaarriiaabblleess wwiitthhiinn mmaaccrrooss   
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563. 1.0                    Proff User's Guide                      26
  1564.  
  1565.  
  1566.      Variable expansions  may  be  performed  within  the macros.
  1567. Typically,  one of the parameters of the macro is assumed to be a
  1568. variable, which is expanded only after the macro is used. Thus: 
  1569.  
  1570.      |
  1571.      |.define xx
  1572.      |.ce
  1573.      |$$1
  1574.      |.cl $$1
  1575.      |.en
  1576.      |
  1577.  
  1578. The  macro xx assumes the first parameter to be a variable, which
  1579. is  centered  on  the  page,  and  also  entered  in the table of
  1580. contents.   Note the usage of "$$1". The lines within a macro are
  1581. scanned  from  right  to left for parameter expansion. Thus, "$1"
  1582. is  expanded  first,  resulting  in "$<first parameter>". This is
  1583. later expanded as a variable.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623. 1.0                    Proff User's Guide                      27
  1624.  
  1625.  
  1626. 66..00 EExxaammppllee mmaaccrrooss    
  1627.  
  1628.      .!
  1629.      .! macros to create a point-form lists.
  1630.      .! note the use of number registers within
  1631.      .! the macros.
  1632.      .!------------
  1633.      .define list
  1634.      .nr a $1        
  1635.      .in $1
  1636.      .en
  1637.      .!------------
  1638.      .define item
  1639.      .sp
  1640.      .ti -@na
  1641.      $1
  1642.      .en
  1643.      .!------------
  1644.      .define nolist
  1645.      .in -@na
  1646.      .sp
  1647.      .en
  1648.      .!------------
  1649.  
  1650. The  "list" macro is used to generate point-form lists. The first
  1651. parameter  is  an  indent value, size of point-str + 1. A typical
  1652. usage may be as  follows: 
  1653.  
  1654.      |
  1655.      |Project work involves:
  1656.      |.sp
  1657.      |.list 3                { size-of-point-str + 1 }
  1658.      |.item a)               { "a)" is the point-str }
  1659.      |choosing a topic
  1660.      |.item b)
  1661.      |defining the topic
  1662.      |.item c)
  1663.      |research
  1664.      |.item d)
  1665.      |organizing the notes
  1666.      |{etc.}
  1667.      |.nolist                { readjusts the indent  }
  1668.      |
  1669.  
  1670. The above usage will produce the following:
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683. 1.0                    Proff User's Guide                      28
  1684.  
  1685.  
  1686.  
  1687.      |
  1688.      |Project work involves:
  1689.      |
  1690.      |a) choosing a topic
  1691.      |
  1692.      |b) defining the topic
  1693.      |
  1694.      |c) research
  1695.      |
  1696.      |d) organizing the notes
  1697.      |
  1698.  
  1699. The  point-form  recommendations  under  section  5.1  (Care  and
  1700. Feeding  of   Memory)  were generated with the same set of macros
  1701. described above.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743. 1.0                    Proff User's Guide                      29
  1744.  
  1745.  
  1746. 77..00 AAcckknnoowwlleeddggeemmeennttss     
  1747.  
  1748.      This document  was  edited  by  Terry  Lim and Steven Tress.
  1749. The  format  of  the  document is largely based on The Freshwater
  1750. Institute  RUNOFF  User's  Guide.  The  Quotes  for  the  various
  1751. formatting  examples  are from THE QUOTABLE NOTHING BOOK and from
  1752. 1001  LOGICAL  LAWS, ACCURATE AXIOMS, PROFOUND PRINCIPLES, TRUSTY
  1753. TRUISMS,  HOMEY  HOMILIES, COLORFUL COROLLARIES, QUOTABLE QUOTES,
  1754. AND  RAMBUNCTIOUS  RUMINATIONS  FOR  ALL WALKS OF LIFE, by Peers,
  1755. Bennet and Booth, Fawcett Columbine Books, New York.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803. 1.0                        Appendix A                          30
  1804.  
  1805.  
  1806. AAppppeennddiixx AA     
  1807.                        Summary of Commands
  1808.  
  1809. ----------------------------------------------------------
  1810. .fi | .f | .fill
  1811.                 default:        initial: yes    break: yes
  1812.                 begin filling output lines
  1813. ----------------------------------------------------------
  1814. .nf | .nofill
  1815.                 default:        initial: no     break: yes
  1816.                 stop filling
  1817. ----------------------------------------------------------
  1818. .ju | .j | .justify
  1819.                 default:        initial: yes    break: yes
  1820.                 begin justifying filled lines
  1821. ----------------------------------------------------------
  1822. .nj | .nojustify
  1823.                 default:        initial: no     break: yes
  1824.                 stop justifying
  1825. ----------------------------------------------------------
  1826. .br | .break
  1827.                 default:        initial:        break: yes
  1828.                 cause a break and output current line
  1829. ----------------------------------------------------------
  1830. .in | .lm | .leftmargin [+|-][n]
  1831.                 default: 0      inital: 0       break: yes
  1832.                 set left margin to column n+1
  1833. ----------------------------------------------------------
  1834. .ti | .i | .left [+|-][n]
  1835.                 default: 0      initial:        break: yes
  1836.                 temporarily indent next output n spaces
  1837. ----------------------------------------------------------
  1838. .st | .spaceto [-][n]
  1839.                 default: 0      initial:        break: yes
  1840.                 space to line +n from top
  1841.                 space to line -n from bottom
  1842. ----------------------------------------------------------
  1843. .sp | .s | .skip [n]
  1844.                 default: 1      initial:        break: yes
  1845.                 space n lines except at top of page
  1846. ----------------------------------------------------------
  1847. .ce | .center [n | on | off]
  1848.                 default: 1      initial         break: yes
  1849.                 center next n lines
  1850.                 center until turned off
  1851. ----------------------------------------------------------
  1852. .ul | .underline [n | on | off]
  1853.                 default: 1      initial         break: no
  1854.                 underline next n lines
  1855.                 underline until turned off
  1856. ----------------------------------------------------------
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863. 1.0                        Appendix A                          31
  1864.  
  1865.  
  1866. ----------------------------------------------------------
  1867. .ul | .underline [all | words]
  1868.                 default: words  initial: words  break: no
  1869.                 set mode for underline - words or all
  1870. ----------------------------------------------------------
  1871. .bd | .bold [n | on | off]
  1872.                 default: 1      initial:        break: no
  1873.                 boldface (overstrike) next n lines
  1874.                 boldface until turned off
  1875. ----------------------------------------------------------
  1876. .db | .dbo | .disablebolding
  1877.                 default:        initial: no     break: no
  1878.                 disable bolding
  1879. ----------------------------------------------------------
  1880. .eb | .ebo | .enablebolding
  1881.                 default:        initial: yes    break: no
  1882.                 enable bolding
  1883. ----------------------------------------------------------
  1884. .ls | .spc | .spacing [n]
  1885.                 default: 1      initial: 1      break: no
  1886.                 set line spacing to n
  1887. ----------------------------------------------------------
  1888. .bp | .pg | .page [n]
  1889.                 default: +1     initial: 1      break: yes
  1890.                 begin a new page and number it n
  1891. ----------------------------------------------------------
  1892. .pn | .pagenumber {roman} | {arabic}
  1893.                 default:        initial: arabic break: no
  1894.                 set page numbering to arabic or roman
  1895. ----------------------------------------------------------
  1896. .np | .nopaging
  1897.                 default:        initial: no     break: yes
  1898.                 disable paging
  1899. ----------------------------------------------------------
  1900. .pa | .paging
  1901.                 default:        initial: yes    break: yes
  1902.                 enable paging
  1903. ----------------------------------------------------------
  1904. .ne | .need | .tp | .testpage [n]
  1905.                 default: 0      initial:        break: yes/no
  1906.                 need n lines. Break and generate a new page
  1907.                 if not available
  1908. ----------------------------------------------------------
  1909. .he | .header <text>
  1910.                 default: null   initial: null   break: no
  1911.                 set header to text (/left/center/right/)
  1912. ----------------------------------------------------------
  1913. .fo | .footer <text>
  1914.                 default: null   initial: null   break: no
  1915.                 set footer to text (/lef/center/right/)
  1916. ----------------------------------------------------------
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923. 1.0                        Appendix A                          32
  1924.  
  1925.  
  1926. ----------------------------------------------------------
  1927. .oh <text>
  1928.                 default: null   initial: null   break: no
  1929.                 set header on odd pages to text
  1930. ----------------------------------------------------------
  1931. .eh <text>
  1932.                 default: null   initial: null   break: no
  1933.                 set header on even pages to text
  1934. ----------------------------------------------------------
  1935. .of <text>
  1936.                 default: null   initial: null   break: no
  1937.                 set footer on odd pages to text
  1938. ----------------------------------------------------------
  1939. .ef <text>
  1940.                 default: null   initial: null   break: no
  1941.                 set footer on odd pages to text
  1942. ----------------------------------------------------------
  1943. .po | .offset [+|-][n]
  1944.                 default: 0      initial: 0      break: yes
  1945.                 set page offset to n spaces
  1946. ----------------------------------------------------------
  1947. .rm | .rightmargin [+|-][n] 
  1948.                 default: 65     initial: 65     break: no
  1949.                 set right margin to column n
  1950. ----------------------------------------------------------
  1951. .pl | .ps | .pagesize [n]
  1952.                 default: 66     initial: 66     break: no
  1953.                 set page length to n lines
  1954. ----------------------------------------------------------
  1955. .m1 [n]
  1956.                 default: 3      initial: 3      break: no
  1957.                 lines between top of page and header
  1958. ----------------------------------------------------------
  1959. .m2 [n]
  1960.                 default: 2      initial: 2      break: no
  1961.                 lines between header and text
  1962. ----------------------------------------------------------
  1963. .m3 [n]
  1964.                 default: 2      initial: 2      break: no
  1965.                 lines between text and footer
  1966. ----------------------------------------------------------
  1967. .m4 [n]
  1968.                 default: 3      initial: 3      break: no
  1969.                 lines between footer and bottom
  1970. ----------------------------------------------------------
  1971. .cl | .contline [<n> <text>]
  1972.                 default:        initial:        break: yes
  1973.                 enter text into table of contents at level
  1974.                 n
  1975. ----------------------------------------------------------
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983. 1.0                        Appendix A                          33
  1984.  
  1985.  
  1986. ----------------------------------------------------------
  1987. .pc | .printcont [n]
  1988.                 default: 3      initial: 3      break: yes
  1989.                 print table of contents, indent each level
  1990.                 n spaces
  1991. ----------------------------------------------------------
  1992. .vs | .set <variable> [definition]
  1993.                 default:        initial:        break: no
  1994.                 set variable to text
  1995. ----------------------------------------------------------
  1996. .vg | .get <variable> <prompt>
  1997.                 default:        initial:        break: no
  1998.                 set variable interactively, using text
  1999.                 as prompt
  2000. ----------------------------------------------------------
  2001. .nr <a-z> [+|-][n]
  2002.                 default: 0      initial: 0      break: no
  2003.                 set number register (a-z) to n
  2004. ----------------------------------------------------------
  2005. .cc | .cchar [char]
  2006.                 default: "."    initial: "."    break: no
  2007.                 set command control character to char
  2008. ----------------------------------------------------------
  2009. .ec | .echar [char]
  2010.                 default: "_"    initial: "_"    break: no
  2011.                 set universal escape character to char
  2012. ----------------------------------------------------------
  2013. .so | .source | .include | .require [filename]
  2014.                 default:        initial: input  break: no
  2015.                 switch input to file
  2016. ----------------------------------------------------------
  2017. .sv | .save
  2018.                 default:        initial:        break: yes
  2019.                 save the current formatter context on 
  2020.                 context stack
  2021. ----------------------------------------------------------
  2022. .rs | .restore
  2023.                 default:        initial:        break: yes
  2024.                 restore the formatter context from context
  2025.                 stack
  2026. ----------------------------------------------------------
  2027. .lx | .lex <command> [equate]
  2028.                 default:        initial:        break: no
  2029.                 rename a command
  2030. ----------------------------------------------------------
  2031. .ap | .autoparagraph
  2032.                 default:        initial: no     break: no
  2033.                 enable auto-paragraphing
  2034. ----------------------------------------------------------
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043. 1.0                        Appendix A                          34
  2044.  
  2045.  
  2046. ----------------------------------------------------------
  2047. .na | nap | .noautoparagraph
  2048.                 default:        initial: yes    break: no
  2049.                 disable auto-paragraphing
  2050. ----------------------------------------------------------
  2051. .wr | .write <string>
  2052.                 default:        initial:        break: no
  2053.                 write a special string to output. line
  2054.                 counter does not change
  2055. ----------------------------------------------------------
  2056. .de | .define <macro name>
  2057.                 default:        initial:        break: no
  2058.                 define a macro command - ends at ".en"
  2059. ----------------------------------------------------------
  2060. .en
  2061.                 default:        initial:        break: no
  2062.                 end the macro definition
  2063. ----------------------------------------------------------
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.                         Table Of Contents
  2107.  
  2108.                             PROFF 1.0
  2109. 1.0 Introduction    .......................................    1
  2110.  
  2111. 2.0 General Description   .................................    2
  2112.  
  2113.    2.1 The Input   ........................................    2
  2114.       2.1.1 Text    .......................................    2
  2115.       2.1.2 Commands    ...................................    2
  2116.  
  2117.    2.2 The Output   .......................................    3
  2118.  
  2119.    2.3 Executing PROFF   ..................................    3
  2120.  
  2121.    2.4 Bibliographic Notes   ..............................    4
  2122.  
  2123.    2.5 References and Readings  ...........................    4
  2124.  
  2125. 3.0 Command Descriptions   ................................    5
  2126.  
  2127.    3.1 Filling and Justifying  ............................    6
  2128.       .fi | .f | .fill.....................................    6
  2129.       .nf | .nofill........................................    6
  2130.       .ju | .j | .justify..................................    6
  2131.       .nj | .nojustify.....................................    6
  2132.  
  2133.    3.2 Text Formatting   ..................................    7
  2134.       .br | .break.........................................    7
  2135.       .in | .lm | .leftmargin [+|-][n].....................    7
  2136.       .ti | .i | .left [+|-][n]............................    7
  2137.       .st | .spaceto [-][n]................................    7
  2138.       .sp | .s | .skip [n].................................    7
  2139.       .ce | .center [n | on | off].........................    7
  2140.       .ul | .underline [n | on | off]......................    7
  2141.       .ul | .underline [all | words].......................    8
  2142.       .bd | .bold [n | on | off]...........................    8
  2143.       .db | .dbo | .disablebolding.........................    8
  2144.       .eb | .ebo | .enablebolding..........................    8
  2145.  
  2146.    3.3 Page Formatting   ..................................    9
  2147.       .ls | .spc | .spacing [n]............................    9
  2148.       .bp | .pg | .page [n]................................    9
  2149.       .pn | .pagenumber {roman} | {arabic}.................    9
  2150.       .np | .nopaging......................................    9
  2151.       .pa | .paging........................................    9
  2152.       .ne | .need | .tp | .testpage [n]....................    9
  2153.       .he | .header <text>.................................    9
  2154.       .fo | .footer <text>.................................   10
  2155.       .oh <text>...........................................   10
  2156.       .eh <text>...........................................   10
  2157.       .of <text>...........................................   10
  2158.  
  2159.  
  2160.                               - I -
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.       .ef <text>...........................................   10
  2167.  
  2168.    3.4 Page Layout   ......................................   11
  2169.       .po | .offset [+|-][n]...............................   11
  2170.       .rm | .rightmargin [+|-][n]..........................   11
  2171.       .pl | .ps | .pagesize [n]............................   11
  2172.       .m1 [n]..............................................   12
  2173.       .m2 [n]..............................................   12
  2174.       .m3 [n]..............................................   12
  2175.       .m4 [n]..............................................   12
  2176.  
  2177.    3.5 Table of Contents  .................................   13
  2178.       .cl | .contline [<n> <text>].........................   13
  2179.       .pc | .printcont [n].................................   13
  2180.  
  2181.    3.6 Miscellaneous    ...................................   15
  2182.       .vs | .set <variable> [definition]...................   15
  2183.       .vg | .get <variable> <prompt>.......................   15
  2184.       .nr <a-z> [+|-][n]...................................   16
  2185.       .cc | .cchar [char]..................................   16
  2186.       .ec | .echar [char]..................................   16
  2187.       .so | .source | .include | .require [filename].......   16
  2188.       .sv | .save..........................................   16
  2189.       .rs | .restore.......................................   17
  2190.       .lx | .lex <command> [equate]........................   17
  2191.       .ap | .autoparagraph.................................   17
  2192.       .na | nap | .noautoparagraph.........................   17
  2193.       .wr | .write <string>................................   18
  2194.  
  2195.    3.7 Defining New Commands (Macros) .....................   20
  2196.       .de | .define <macro name>...........................   20
  2197.       .en..................................................   20
  2198.  
  2199. 4.0 Executing PROFF   .....................................   23
  2200.  
  2201. 5.0 Tips on using PROFF ...................................   25
  2202.    5.1 Care and Feeding of Memory..........................   25
  2203.    5.2 Formatting without fuss  ...........................   25
  2204.    5.3 Variables within macros  ...........................   25
  2205.  
  2206. 6.0 Example macros   ......................................   27
  2207.  
  2208. 7.0 Acknowledgements    ...................................   29
  2209.  
  2210. Appendix A    .............................................   30
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.                              - II -
  2221.  
  2222.